package com.dream.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

@Entity
@Table(name = "sysuser")
public class SysUser extends AllId implements Serializable
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String userName;
	private String userShowName;
	private String userEngListName;
	private String userPwd;
	private String tell;
	private String userEmail;
	private String sex;
	private Integer age;
	private String note;
	private String userType;// 6管理员，1学生，2老师，3家长，4助教，5专家
	private String userImage;
	private String teacherId;// 我的老师
	private String teacherType;// 专长老师
	private String state="1";//状态，0禁用，1启用
	private String country;//国家
	private String education;//学历
	private String qualifications;//荣誉资格 
	private List<Sys_ClassPlant> listclassplant = null; //一个老师有多个课排表

	private List<Sys_LearnPlant> listLearplant = null; //一个老师有多个学期计划
	
	private List<Sys_Room_Position_User> listsrp = null;//一个学生有多个教室多个位置
	
	private List<Sys_Room> listsr = null;//一个学生有多个教室
	
	private List<Sys_User_Class> listsuc = null;//一个学生和老师可以同时 在几个年级或者班或者校
	
	private List<Sys_User_Honor> listsuh = null;//一个人学生有多个荣誉
	
	private List<Sys_User_Lable> listsul = null;//一个学生，老师，专家有多个标签 ，
	
	private List<Sys_User_Question> listsuq = null;//一个学生有多道题
	
	private List<Sys_User_TestPaper> listsut =null;//一个用户可以有多卷
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_User_TestPaper> getListsut()
	{
		return listsut;
	}

	public void setListsut(List<Sys_User_TestPaper> listsut)
	{
		this.listsut = listsut;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_User_Question> getListsuq()
	{
		return listsuq;
	}

	public void setListsuq(List<Sys_User_Question> listsuq)
	{
		this.listsuq = listsuq;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_User_Lable> getListsul()
	{
		return listsul;
	}

	public void setListsul(List<Sys_User_Lable> listsul)
	{
		this.listsul = listsul;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_User_Honor> getListsuh()
	{
		return listsuh;
	}

	public void setListsuh(List<Sys_User_Honor> listsuh)
	{
		this.listsuh = listsuh;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_User_Class> getListsuc()
	{
		return listsuc;
	}

	public void setListsuc(List<Sys_User_Class> listsuc)
	{
		this.listsuc = listsuc;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_Room> getListsr()
	{
		return listsr;
	}

	public void setListsr(List<Sys_Room> listsr)
	{
		this.listsr = listsr;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_Room_Position_User> getListsrp()
	{
		return listsrp;
	}

	public void setListsrp(List<Sys_Room_Position_User> listsrp)
	{
		this.listsrp = listsrp;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_LearnPlant> getListLearplant()
	{
		return listLearplant;
	}

	public void setListLearplant(List<Sys_LearnPlant> listLearplant)
	{
		this.listLearplant = listLearplant;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysUser", orphanRemoval = true)
	@Cascade(value = { CascadeType.SAVE_UPDATE })
	@BatchSize(size = 20)
	public List<Sys_ClassPlant> getListclassplant()
	{
		return listclassplant;
	}

	public void setListclassplant(List<Sys_ClassPlant> listclassplant)
	{
		this.listclassplant = listclassplant;
	}

	public String getUserName()
	{
		return userName;
	}

	public void setUserName(String userName)
	{
		this.userName = userName;
	}

	public String getUserShowName()
	{
		return userShowName;
	}

	public void setUserShowName(String userShowName)
	{
		this.userShowName = userShowName;
	}

	public String getUserEngListName()
	{
		return userEngListName;
	}

	public void setUserEngListName(String userEngListName)
	{
		this.userEngListName = userEngListName;
	}

	public String getTell()
	{
		return tell;
	}

	public void setTell(String tell)
	{
		this.tell = tell;
	}

	public String getUserEmail()
	{
		return userEmail;
	}

	public void setUserEmail(String userEmail)
	{
		this.userEmail = userEmail;
	}

	public String getSex()
	{
		return sex;
	}

	public void setSex(String sex)
	{
		this.sex = sex;
	}

	public String getNote()
	{
		return note;
	}

	public void setNote(String note)
	{
		this.note = note;
	}

	public String getUserType()
	{
		return userType;
	}

	public void setUserType(String userType)
	{
		this.userType = userType;
	}

	public String getUserImage()
	{
		return userImage;
	}

	public void setUserImage(String userImage)
	{
		this.userImage = userImage;
	}

	public String getTeacherId()
	{
		return teacherId;
	}

	public void setTeacherId(String teacherId)
	{
		this.teacherId = teacherId;
	}

	public String getTeacherType()
	{
		return teacherType;
	}

	public void setTeacherType(String teacherType)
	{
		this.teacherType = teacherType;
	}

	public String getUserPwd()
	{
		return userPwd;
	}

	public void setUserPwd(String userPwd)
	{
		this.userPwd = userPwd;
	}

	public Integer getAge()
	{
		return age;
	}

	public void setAge(Integer age)
	{
		this.age = age;
	}

	public String getState()
	{
		return state;
	}

	public void setState(String state)
	{
		this.state = state;
	}

	public String getCountry()
	{
		return country;
	}

	public void setCountry(String country)
	{
		this.country = country;
	}

	public String getEducation()
	{
		return education;
	}

	public void setEducation(String education)
	{
		this.education = education;
	}

	public String getQualifications()
	{
		return qualifications;
	}

	public void setQualifications(String qualifications)
	{
		this.qualifications = qualifications;
	}

	public SysUser(String table_id, String userName, String userShowName, String userEngListName, String userPwd, String tell, String userEmail, String sex, Integer age, String note, String userType, String userImage, String teacherId, String teacherType, String state, String country, String education, String qualifications,String showTime) {
		super(table_id);
		this.userName = userName;
		this.userShowName = userShowName;
		this.userEngListName = userEngListName;
		this.userPwd = userPwd;
		this.tell = tell;
		this.userEmail = userEmail;
		this.sex = sex;
		this.age = age;
		this.note = note;
		this.userType = userType;
		this.userImage = userImage;
		this.teacherId = teacherId;
		this.teacherType = teacherType;
		this.state = state;
		this.country = country;
		this.education = education;
		this.qualifications = qualifications;
		super.showTime=showTime;
	}

	public SysUser() {
		 
	} 

}
